package pers.cyw.oraclejavaproject.threaddemo;

public class ThreadDemo extends Thread {
    @Override
    public void  run(){
        //此方法体写线程运行代码
        while (!Thread.currentThread().isInterrupted()){
            System.out.println("A");
        }
    }

    @Override
    public synchronized void start() {
        //此方法写开始运行线程
        //创建线程前
        super.start();
        //开始运行线程后
    }
}
